package 工具类;

import java.sql.*;

public class JdbcUtils {
    //链接数据库
    public static Connection getConnection() throws ClassNotFoundException, SQLException{
        Class.forName("com.mysql.jdbc.Driver");
        String url  ="jdbc:mysql://localhost/smbms";
        String  user ="root";
        String password = "123456";
        Connection connection = DriverManager.getConnection(url,user,password);
        return  connection;
    }

    public static void close(Connection connection, PreparedStatement preparedStatement, ResultSet resultSet) {
    }
}
